home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / datatypes / clidt / help / cli_dtc (.txt) next >
Amigaguide Document  |  1996-04-07  |  3KB  |  51 lines

  1. @database cli_dtc.doc
  2. @master doc/cli_dtc.doc
  3. @node main "cli_dtc.doc"
  4. @toc xref.library_xreffile@main
  5. @{settabs 40}@{" cli.datatype " link "cli.datatype"}    
  6. @endnode
  7. @node "cli.datatype" "cli.datatype/cli.datatype"
  8.     @{b}NAME@{ub}
  9.         cli.datatype - data type for launching extern programs and
  10.             displaying the command's standard output
  11.     @{b}FUNCTION@{ub}
  12.         This datatype launches an extern command and displays the standard
  13.         output of that command. This is useful to view the contents of a
  14.         archive like lha or tar archives without writing a complete datatype.
  15.         The standard output is placed in a tempory file in "T:", because the
  16.         datatypes.library can't handle pipes. From V39.2 the cli.datatype
  17.         uses NewDTObject() for the tempory file. So it's possible to display
  18.         files, which have special datatypes (e.g. Unix-Manual-Pages).
  19.     @{b}PREFS@{ub}
  20.         The cli datatype is configured by a preference file "cli.prefs" in
  21.         "PROGDIR:Prefs/Datatypes/" or "Env:Datatypes/".
  22.         The file is parsed using @{"ReadArgs()" link "dos/ReadArgs()"} with the following template :
  23.         "@{"DATATYPE" link "AG:SysInc/datatypes/datatypes.h/main" 174}/A,STACK/N/K,SUFFIX/K,COMMAND/F/K/A"
  24.         @{"DATATYPE" link "AG:SysInc/datatypes/datatypes.h/main" 174} - specifies the datatype
  25.         STACK    - size of stack to use for the command
  26.         SUFFIX   - suffix to use for tempory file, thus the datatypes.library
  27.             can determine the type of the file (e.g: ".0" for Man-Datatype)
  28.         COMMAND  - specifies the command to launch for that datatype, a "%s"
  29.             in the command string is replaced by the real filename.
  30.     @{b}EXAMPLE@{ub}
  31.         ; cli.datatype preference file
  32.         Lha                         COMMAND=lha v %s
  33.         Tar                         COMMAND=tar tvf %s
  34.         NRoff STACK=50000 SUFFIX=.0 COMMAND=bin:groff -man -Tascii %s
  35.     @{b}METHODS@{ub}
  36.         @{"OM_NEW" link "AG:SysInc/intuition/classusr.h/main" 63} - create a new object and launch the extern command
  37.         @{"OM_DISPOSE" link "AG:SysInc/intuition/classusr.h/main" 64} - delete the object
  38.     @{b}TAGS@{ub}
  39.         none
  40.     @{b}NOTE@{ub}
  41.         With the used method of creating and handling of tempory output, it's
  42.         also possible to create a special datatype for crunshed files through
  43.         PowerPacker or XPK. All what have to be done is to create a tempory
  44.         file and then call NewDTObject() on that. The source of the
  45.         cli.datatype gives a the skeleton for such datatypes. Please feel
  46.         free
  47.         to implement XPK or PowerPacker datatypes. I don't do this.
  48.     @{b}SEE ALSO@{ub}
  49.         text.datatype, @{"ascii.datatype" link "ascii_dtc/ascii.datatype"}, datatypes.library
  50. @endnode
  51.